var Console = {
	messages: [],
	
	addMessage: function(message, type, color){
		if (type != "u1" && this.messages.length > 0) {
			var lm = this.messages[this.messages.length - 1];
			if (lm.type == type){
				lm.amount += 1;
				return;
			}
		}
		
		var msg = {
			msg: message,
			type: type,
			amount: 1,
			color: color
		};
		
		this.messages.push(msg);
		if (this.messages.length > 10){
			this.messages.splice(0,1);
		}
	}
};
